package com.imooc.controller;


import com.imooc.properties.GirlProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Created by chenxin on 2017/4/23.
 */
@RestController
@RequestMapping("/haha")
public class HelloController {

    @Autowired
    GirlProperties girlProperties;
//    @Value("${cupSize}")
//    private String cupSize;
//    @Value("${age}")
//    private Integer age;
//    @Value("${content}")
//   private String content;
   // @RequestMapping(value = {"/hello","hi"},method = RequestMethod.GET)
    //@PostMapping(value = {"/hello/{id}","hi"})
    @PostMapping(value = {"/hello","hi"})
   // public String say(@PathVariable("id") Integer id){
    public String say(@RequestParam(value = "id",required = false,defaultValue = "1") Integer ids){
        //return girlProperties.getCupSize();
       // return "index";
        return "id"+ids;
    }
}
